import { Element } from '../../../fieldType'
import commonField from '../../../propertyPanel/commonConfig'
export interface RegionElement extends Element {
  regionType: number
  hint: string
  width: number
}
function formListFactory () {
  return [
    commonField.name,
    commonField.attrCode,
    { label: '地区类型', name: 'regionType', type: 'select', data: [{ label: '省', value: 1 }, { label: '省-市', value: 2 }, { label: '省-市-县', value: 3 }] },
    { label: '提示文字', name: 'hint', type: 'textarea', maxlength: 50 },
    commonField.width
  ]
}
const formList = formListFactory()
const formTemplate: RegionElement = {
  attrCode: '',
  businessId: '',
  name: '地区',
  fieldType: 'region',
  regionType: 3,
  hint: '',
  width: 1
}
export default {
  formList,
  formTemplate
}
